﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using IGGCore;

namespace IGGTestingConsole
{
    class Program
    {
        private static MainChannel _mainChannel;
        private static int _testNumber = 1;

        static void Main(string[] args)
        {
            Console.WriteLine();
            Console.WriteLine(" Welcome to the IGG Testing Console");
            Console.WriteLine();
            TEST_MainChannel_Constructor();
            Console.WriteLine();
            TEST_MainChannel_Initialize();
            Console.WriteLine();
            TEST_Twitter();
            Console.WriteLine();
            Console.WriteLine(" END OF TESTS");
            Console.WriteLine();
            Console.ReadKey();
        }

        private static void TEST_MainChannel_Constructor()
        {
            Console.WriteLine(" TEST " + _testNumber++ + " - Instantiating the Main Channel");
            try
            {
                _mainChannel = new MainChannel();
                Console.WriteLine(" RESULT: Success");
            }
            catch(Exception ex)
            {
                Console.WriteLine(" RESULT: Failure");
                Console.WriteLine(" " + ex.Message);
                Console.WriteLine(ex.StackTrace);
            }
        }

        private static void TEST_MainChannel_Initialize()
        {
            Console.WriteLine(" TEST " + _testNumber++ + " - Initializing the Main Channel");
            try
            {
                _mainChannel.Initialize();
                Console.WriteLine(" RESULT: Success");
            }
            catch (Exception ex)
            {
                Console.WriteLine(" RESULT: Failure");
                Console.WriteLine(" " + ex.Message);
                Console.WriteLine(ex.StackTrace);
            }
        }

        private static void TEST_Twitter()
        {
            Console.WriteLine(" TEST " + _testNumber++ + " - Twitter");
            try
            {
                //_mainChannel.Initialize();
                Console.WriteLine(" RESULT: Success");
            }
            catch (Exception ex)
            {
                Console.WriteLine(" RESULT: Failure");
                Console.WriteLine(" " + ex.Message);
                Console.WriteLine(ex.StackTrace);
            }
        }


    }
}
